<template>
  <el-row>
      <el-col :span="20">
          <div class="left"><h1>咖啡豆旅馆欢迎您！！！</h1></div>
      </el-col>
      <el-col :span="4"><div class="right">
        <el-dropdown @command="handleCommand">
          <span class="el-dropdown-link">
            <i class="el-icon-user-solid"></i>
          </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item command="getmsg">个人信息</el-dropdown-item>
            <el-dropdown-item command="logout">退出登录</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
          <!-- <i class="el-icon-user-solid"></i> -->
        </div></el-col>
  </el-row>
</template>

<script>
export default {
name:'',
components: {  },
data() {
   return {
      
   }
},
methods:{
  handleCommand(command){
    if(command === 'logout'){
      // console.log(command);
      this.$router.push({name:'Login'})
    }else if(command === 'getmsg'){
      // console.log(command);
      this.$router.push({name:'User'})
    }
  }
}
}
</script>

<style lang="less" scoped>
.el-dropdown{
  font-size: 30px;
}
.i{
  height: 20px;
  width: 30px;
}


</style>